package com.bjpowernode.mapper;

import com.bjpowernode.annotation.DataScope;
import com.bjpowernode.entity.TCustomer;
import com.bjpowernode.entity.query.BaseQuery;
import com.bjpowernode.entity.query.CustomerExcel;
import com.bjpowernode.entity.vo.CustomerListVO;
import com.bjpowernode.entity.vo.SummaryDataVO;

import java.util.List;

public interface TCustomerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TCustomer record);

    int insertSelective(TCustomer record);

    TCustomer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TCustomer record);

    int updateByPrimaryKey(TCustomer record);

    @DataScope(tableAlias = "cl", columnName = "owner_id")
    List<CustomerListVO> getCustomerByPage(BaseQuery baseQuery);

    @DataScope(tableAlias = "cl", columnName = "owner_id")
    List<CustomerExcel> getCustomerExcelList(BaseQuery baseQuery, List<String> idList);

    TCustomer getCustomerById(Integer id);

    SummaryDataVO getSummaryData();

    Integer getCustomerCount();
}